<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<c:set var="path" value="${pageContext.request.contextPath }" />
<%@ taglib tagdir="/WEB-INF/tags" prefix="matrix"%>
<%@ taglib uri="http://matrixcsm.zkingsoft.com" prefix="cms"%>

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="renderer" content="webkit">
<meta http-equiv="Cache-Control" content="no-siteapp">
<title data-index="0" id="selextTitle">${网页标题 }</title>
<meta name="keywords" content="${网页关键词}">
<meta name="description" content="${网页描述 }" />

<!--[if lt IE 8]>
    <meta http-equiv="refresh" content="0;ie.html" />
    <![endif]-->
<link
	href="${path }/resource/plugin/bootstrap-3.3.5/css/bootstrap.min.css"
	rel="stylesheet" type="text/css">
<link
	href="${path }/resource/plugin/font-awesome/css/font-awesome.min.css"
	rel="stylesheet" type="text/css">
<link href="${path }/resource/css/styleOne/animate.min.css"
	rel="stylesheet" type="text/css" />
<link rel="shortcut icon" href="${浏览器logo }">
</head>
<body class="">

	<jsp:include page="_top.jsp"></jsp:include>

	<h1>获取广告</h1>
	<cms:ad var="gttt" code="banner" ></cms:ad>
	<ul>
		<c:forEach items="${gttt }" var="item">
			<li>广告词：${item.adTitle}<br> 图片：<img width="100"
				height="100" alt="" src="${item.adImg }"><br> 广告链接：<a>${item.adUrl}</a><br>
			</li>

		</c:forEach>

	</ul>
	<hr>

	<h1>获取文章类型列表</h1>
	<cms:artType var="type" code="jswz"></cms:artType>
	<c:forEach items="${type }" var="item">
		<h4>${item.artTypeName }</h4>
	</c:forEach>
	<hr>


	<h1>获取一篇文章</h1>
	<cms:art var="art" title="系统文章-关于我们" ></cms:art>
	<p>标题：${art.artTitle }</p>
	<p>内容：${art.artContent }</p>
	<hr>

	<h1>分页加载新闻</h1>
	<div class="wrap">
		<div class="container">
			<h3>文章列表</h3>
			<div id="showdataBox"></div>
			<h3>分页器</h3>
			<div id="pagingBox" class="pages"></div>
		</div>
	</div>
	<form class="am-form am-form-horizontal" id="dataform"
		onsubmit="javascripr:return false;">
		<input type="hidden" name="code"  value="hydt" />
		<input type="hidden" name="offset" id="_offset" value="0" /> <input
			type="hidden" id="limit" name="limit" value="10" />
	</form>
	<script type="text/javascript"
	src="${path }/resource/js/plugin/jquery-2.1.4.min.js"></script>
	<script type="text/javascript"
		src="${path }/resource/js/systools/AjaxProxy.js"></script>
	<script type="text/javascript"
		src="${path }/resource/js/systools/MForm.js"></script>
	<script type="text/javascript"
		src="${path }/resource/model/js/Pagination.js"></script>
	<script>
		$(function() {
			var pageSize = 5; 
			console.log($("#limit").val());
			Pagination
					.init(
							{
								url : "${path}/findNews",
								pageSize : pageSize,
								builderDate : function(loj) {
									if (loj.getRowCount() > 0) {
										//构建数据
										var html = [];
										for (var i = 0; i < loj.getRowCount(); i++) {
											html[i] = 
												'<a target="blank" href="${path}/redirect/article?id='+ loj.getString(i, "artId")+' " >'+ loj.getString(i, "artTitle")+'</a><br>';
										}
										console.log(html);
										return html.join("");
									}
								}
							}).serchDate();
		})
	</script>



	<jsp:include page="_foot.jsp"></jsp:include>
	${自定义js}
	   
</body>
</html>
